Fix handing of overall alpha.
authorOwen Taylor <otaylor@redhat.com>
Mon, 11 Feb 2002 19:36:12 +0000 (19:36 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 11 Feb 2002 19:36:12 +0000 (19:36 +0000)
Mon Feb 11 14:31:53 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c (bilinear_make_weights): Fix handing of
        overall alpha.

gdk-pixbuf/ChangeLog
gdk-pixbuf/pixops/pixops.c

index c7b259670faee9de234d9f5be5ea9b6aee2d051f..52461ec7323527c5b0f2987d4b44efc3497c78e4 100644 (file)
@@ -1,3 +1,8 @@
+Mon Feb 11 14:31:53 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * pixops/pixops.c (bilinear_make_weights): Fix handing of
+       overall alpha.
+
 2002-02-10  Matthias Clasen  <matthias@local>
 
        * test-loaders.c (main): Enable some tests which should work
index 12ba7f754c338b2c4461919e7df03b58a9e20021..0bcbcec011150b72df03a316c5a1fb6982ccd042 100644 (file)
@@ -1144,7 +1144,7 @@ tile_make_weights (PixopsFilter *filter, double x_scale, double y_scale, double
                *(pixel_weights + n_x * i + j) = weight;
              }
 
-           *(pixel_weights + n_x * n_y - 1) += 65536 - total;
+           *(pixel_weights + n_x * n_y - 1) += (int)(0.5 + 65536 * overall_alpha) - total;
          }
       }
 }
@@ -1266,7 +1266,7 @@ bilinear_make_fast_weights (PixopsFilter *filter, double x_scale, double y_scale
              total += weight;
            }
 
-       *(pixel_weights + n_x * n_y - 1) += 65536 - total;
+       *(pixel_weights + n_x * n_y - 1) += (int)(0.5 + 65536 * overall_alpha) - total;
       }
 
   g_free (x_weights);
@@ -1368,7 +1368,7 @@ bilinear_make_weights (PixopsFilter *filter, double x_scale, double y_scale, dou
              total += weight;
            }
 
-       *(pixel_weights + n_x * n_y - 1) += 65536 - total;
+       *(pixel_weights + n_x * n_y - 1) += (int)(0.5 + 65536 * overall_alpha) - total;
       }
 }